package com.olddriver.crm.mapper;

import org.apache.ibatis.annotations.Param;
import com.olddriver.crm.domain.Permission;
import com.olddriver.crm.domain.Role;
import com.olddriver.crm.query.QueryObject;

import java.util.List;


public interface RoleMapper {
    int insert(@Param("role") Role role);

    int update(@Param("role") Role role);

    int queryTotal(QueryObject qo);

    List<Role> queryRows(QueryObject qo);

    void insertRelations(@Param("id") Long id, @Param("permissions") List<Permission> permissions);

    void deleteRelations(Long id);

    void deleteById(Long id);

    List<Role> find();

    List<Role> findRoleByEmpId(Long id);

    List<String> findRoleNameByEmpId(Long id);
}
